package com.example.friendfindertwo.data.helper;

import android.database.sqlite.SQLiteDatabase;
import android.util.Log;

public class CategoryTable {
	public static final String TABLE_CATEGORY = "category";
	
	public static final String COLUMN_ID = "_id";
	public static final String COLUMN_NAME = "name";
	
	public static final String TABLE_CREATE = "create table " + TABLE_CATEGORY
			+ "(" + COLUMN_ID + " integer primary key autoincrement, "
			+ COLUMN_NAME + " text not null );";
	
	public static void onCreate(SQLiteDatabase database) {
		database.execSQL(TABLE_CREATE);
	}
	
	public static void onUpgrade(SQLiteDatabase database, int oldVersion, int newVersion) {
		Log.w(EventTable.class.getName(), " Original version: " + oldVersion
				+ " new version" + newVersion);
		database.execSQL("DROP TABLE IF EXISTS " + TABLE_CATEGORY);
		onCreate(database);
	} 
	
}
